﻿using System;
using System.Collections.Generic;
using System.Linq;
using InfoTech.Core.Data;
using InfoTech.LanTranh.MucVu.Bussiness;

namespace GiaoXuLanTranh_MucVu.Reports.HonNhan
{
    public class ClsHonNhan
    {
        public IEnumerable<LINHMUC> LinhMucChanhXu { get; set; }
        public IEnumerable<LINHMUC> LinhMucDaiDien { get; set; }
        public IEnumerable<LINHMUC_CHUCVU> LinhMucChanhXu_ChucVu { get; set; }
        public IEnumerable<LINHMUC_CHUCVU> LinhMucDaiDien_ChucVu { get; set; }
        public IEnumerable<LINHMUC_CHUCVU> LinhMucBiTich_ChucVu { get; set; }
        public IEnumerable<GIAOPHAN> GiaoPhan { get; set; }
        public IEnumerable<GIAOHAT> GiaoHat { get; set; }
        public IEnumerable<GIAOXU> GiaoXu { get; set; }
        private IEnumerable<SOHONNHAN> _sohonnhan;
        public IEnumerable<GIAODAN> GiaoDan_CHONG { get; set; }
        public IEnumerable<GIAODAN> GiaoDan_VO { get; set; }

        public void DisableRefreshType()
        {
            Array.ForEach(GiaoPhan.ToArray(), c => c.RefreshType = RefreshType.None);
            Array.ForEach(GiaoHat.ToArray(), c => c.RefreshType = RefreshType.None);
            Array.ForEach(GiaoXu.ToArray(), c => c.RefreshType = RefreshType.None);
            Array.ForEach(LinhMucBiTich_ChucVu.ToArray(), c => c.RefreshType = RefreshType.None);
            Array.ForEach(LinhMucChanhXu.ToArray(), c => c.RefreshType = RefreshType.None);
            Array.ForEach(LinhMucChanhXu_ChucVu.ToArray(), c => c.RefreshType = RefreshType.None);
            Array.ForEach(LinhMucDaiDien.ToArray(), c => c.RefreshType = RefreshType.None);
            Array.ForEach(LinhMucDaiDien_ChucVu.ToArray(), c => c.RefreshType = RefreshType.None);
            Array.ForEach(_sohonnhan.ToArray(), c => c.RefreshType = RefreshType.None);
            Array.ForEach(GiaoDan_CHONG.ToArray(), c => c.RefreshType = RefreshType.None);
            Array.ForEach(GiaoDan_VO.ToArray(), c => c.RefreshType = RefreshType.None);
        }

        public IEnumerable<GIAOPHAN> GetGiaoPhan()
        {
            return GiaoPhan;
        }
        
        public IEnumerable<GIAOHAT> GetGiaoHat()
        {
            return GiaoHat;
        }
        
        public IEnumerable<GIAOXU> GetGiaoXu()
        {
            return GiaoXu;
        }
        
        public IEnumerable<LINHMUC_CHUCVU> GetLinhMucBiTich_ChucVu()
        {
            return LinhMucBiTich_ChucVu;
        }
        
        public IEnumerable<LINHMUC> GetLinhMucChanhXu()
        {
            return LinhMucChanhXu;
        }
        
        public IEnumerable<LINHMUC_CHUCVU> GetLinhMucChanhXu_ChucVu()
        {
            return LinhMucChanhXu_ChucVu;
        }

        public IEnumerable<LINHMUC> GetLinhMucDaiDien()
        {
            return LinhMucDaiDien;
        }

        public IEnumerable<LINHMUC_CHUCVU> GetLinhMucDaiDien_ChucVu()
        {
            return LinhMucDaiDien_ChucVu;
        }
        
        public IEnumerable<SOHONNHAN> GetSoHonNhan()
        {
            return _sohonnhan;
        }

        public IEnumerable<GIAODAN> GetGiaoDan_Chong()
        {
            return GiaoDan_CHONG;
        }

        public IEnumerable<GIAODAN> GetGiaoDan_Vo()
        {
            return GiaoDan_VO;
        }
    }
}